package etec.foxsoft.telas;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.SystemColor;
import javax.swing.UIManager;
import javax.swing.JLabel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;

import etec.foxsoft.controler.ControllerTelas;

public class Principal extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Principal frame = new Principal();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Principal() {
		setTitle("FoxSoft1.0V");
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 880, 620);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton Botao_Contratos = new JButton("");
		Botao_Contratos.setBorderPainted(false);
		Botao_Contratos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				ControllerTelas.abrirContratos();
			}//Link Contratos
		});
		
		JButton Botao_Contatos = new JButton("");
		Botao_Contatos.setBorderPainted(false);
		Botao_Contatos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ControllerTelas.abrirContatos();
			}//Link Contatos
		});
		Botao_Contatos.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Contatos.png")));
		Botao_Contatos.setBounds(10, 289, 405, 135);
		contentPane.add(Botao_Contatos);
		Botao_Contratos.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Contratos.png")));
		Botao_Contratos.setBounds(449, 289, 405, 135);
		contentPane.add(Botao_Contratos);
		
		JButton Botao_Financeiro = new JButton("");
		Botao_Financeiro.setBorderPainted(false);
		Botao_Financeiro.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			ControllerTelas.abrirEscolherConta();
			}
		});
		Botao_Financeiro.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Financeiro.png")));
		Botao_Financeiro.setBounds(449, 446, 405, 135);
		contentPane.add(Botao_Financeiro);
		
		JButton Botao_Agenda = new JButton("");
		Botao_Agenda.setBorderPainted(false);
		Botao_Agenda.setBorder(null);
		Botao_Agenda.setOpaque(false);
		Botao_Agenda.setBackground(UIManager.getColor("Button.highlight"));
		Botao_Agenda.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ControllerTelas.abrirAgenda(); 
			}//Link Agenda
		});
		Botao_Agenda.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Agenda.png")));
		Botao_Agenda.setBounds(10, 129, 405, 135);
		contentPane.add(Botao_Agenda);
		
		JButton Botao_Estoque = new JButton("");
		Botao_Estoque.setBorderPainted(false);
		Botao_Estoque.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				ControllerTelas.abrirStock();
			}//Link Estoque
		});
		Botao_Estoque.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Estoque.png")));
		Botao_Estoque.setBounds(10, 446, 405, 135);
		contentPane.add(Botao_Estoque);
		
		JButton Botao_Cadastro = new JButton("");
		Botao_Cadastro.setBorderPainted(false);
		Botao_Cadastro.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				ControllerTelas.abrirCadastro();
				
			}//Link Cadastro
		});
		Botao_Cadastro.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Cadastros.png")));
		Botao_Cadastro.setBounds(449, 129, 405, 135);
		contentPane.add(Botao_Cadastro);
		
		JSeparator separator = new JSeparator();
		separator.setBounds(10, 119, 844, 10);
		contentPane.add(separator);
		
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Logo_Paris.png")));
		lblNewLabel.setBounds(10, 0, 232, 99);
		contentPane.add(lblNewLabel);
		
		JLabel lblNewLabel_1 = new JLabel("");
		lblNewLabel_1.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Sem t\u00EDtulo-13.png")));
		lblNewLabel_1.setBounds(733, 0, 121, 118);
		contentPane.add(lblNewLabel_1);
		
		JLabel lblNewLabel_2 = new JLabel("");
		lblNewLabel_2.setHorizontalAlignment(SwingConstants.RIGHT);
		lblNewLabel_2.setIcon(new ImageIcon(Principal.class.getResource("/Imagens/Sem t\u00EDtulo-14.png")));
		lblNewLabel_2.setBounds(289, 11, 434, 97);
		contentPane.add(lblNewLabel_2);
	}
}
